package com.xinrui.sunnyday.serivce.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.xinrui.sunnyday.dao.LoginDao;
import com.xinrui.sunnyday.pojo.Member;
import com.xinrui.sunnyday.pojo.User;
import com.xinrui.sunnyday.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

@Service(interfaceClass = LoginService.class)
@Transactional//事务注解
public class LoginServiceImpl implements LoginService {
    @Autowired
    private LoginDao loginDao;

    /**
     * 通过手机号查询会员
     * @param telephone
     * @return
     */
    @Override
    public Member findMember(Object telephone) {
        return loginDao.findMember(telephone);
    }

    /**
     * 添加会员
     * @param memberOne
     */
    @Override
    public void add(Member memberOne) {
        loginDao.add(memberOne);
    }

}
